A Bounded-Space Tree Traversal Algorithm
نویسندگان
چکیده
An algorithm for traversing binary trees in linear time using constant extra space is presented. The algorithm offers advantages to both Robson traversal and Lindstrom scanning. Under certain conditions, the algorithm can be applied to the marking of cyclic list structures. The algorithm can be generalized to handle N-trees and N-lists.
منابع مشابه
An improved algorithm to reconstruct a binary tree from its inorder and postorder traversals
It is well-known that, given inorder traversal along with one of the preorder or postorder traversals of a binary tree, the tree can be determined uniquely. Several algorithms have been proposed to reconstruct a binary tree from its inorder and preorder traversals. There is one study to reconstruct a binary tree from its inorder and postorder traversals, and this algorithm takes running time of...
متن کاملAn improved algorithm to reconstruct a binary tree from its inorder and postorder traversals
It is well-known that, given inorder traversal along with one of the preorder or postorder traversals of a binary tree, the tree can be determined uniquely. Several algorithms have been proposed to reconstruct a binary tree from its inorder and preorder traversals. There is one study to reconstruct a binary tree from its inorder and postorder traversals, and this algorithm takes running time of...
متن کاملA novel algorithm to determine the leaf (leaves) of a binary tree from its preorder and postorder traversals
Binary trees are essential structures in Computer Science. The leaf (leaves) of a binary tree is one of the most significant aspects of it. In this study, we prove that the order of a leaf (leaves) of a binary tree is the same in the main tree traversals; preorder, inorder, and postorder. Then, we prove that given the preorder and postorder traversals of a binary tree, the leaf (leaves) of a bi...
متن کاملMemory Requirements for Table Computations in Partial K-tree Algorithms
This paper addresses memory requirement issues arising in implementations of algorithms on graphs of bounded treewidth. Such dynamic programming algorithms require a large data table for each vertex of a tree-decomposition T of the input graph. We give a linear-time algorithm that nds the traversal order of T minimizing the number of tables stored simultaneously. We show that this minimum value...
متن کاملEmbeddings of Graphs of Fixed Treewidth and Bounded Degree∗
Let F be any family of graphs of fixed treewidth and bounded degree. We construct a quadratic-time algorithm for calculating the genus distribution of the graphs in F . Within a post-order traversal of the decomposition tree, the algorithm involves a full-powered upgrading of production rules and root-popping. This algorithm for calculating genus distributions in quadratic time complements an a...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Inf. Process. Lett.
دوره 47 شماره
صفحات -
تاریخ انتشار 1993